package com.mooer.app;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.LinearLayout;

import com.mooer.R;

/**
 * @author pengfei.xu
 * @version 创建时间：2011-6-21 下午07:55:34 类说明
 */
public class BusinessDynamic extends Activity implements OnClickListener {

	LinearLayout updateLayout, couponLayout, mangazineLayout;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.business_dynamic_home);
		updateLayout = (LinearLayout) findViewById(R.id.dynamic1);
		couponLayout = (LinearLayout) findViewById(R.id.dynamic2);
		mangazineLayout = (LinearLayout) findViewById(R.id.dynamic3);

		updateLayout.setOnClickListener(this);
		couponLayout.setOnClickListener(this);
		mangazineLayout.setOnClickListener(this);

	}

	@Override
	public void onClick(View v) {
		if (v == updateLayout) {
			Intent intent = new Intent(this, BusinessDynamicList.class);
			startActivity(intent);
		} else if (v == couponLayout) {
			Intent intent = new Intent(this, BusinessDynamicList.class);
			intent.putExtra("type", "coupon");
			startActivity(intent);
		} else if (v == mangazineLayout) {
			Intent intent = new Intent(this, BusinessDynamicMangazine.class);
			startActivity(intent);
		}

	}
}
